/*
 * @Descripttion:
 * @LastEditors: xzh
 * @LastEditTime: 2021-11-11 16:55:49
 */
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Layout from "@/layout/index.vue";

const constantRoutes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    name: "login",
    meta: {
      hidden: true,
      title: "登录",
    },
    component: () => import("@/views/login/index.vue"),
  },
  // {
  //   path: "/404",
  //   component: () => import("@/views/404.vue"),
  //   meta: { hidden: true },
  // },
  {
    path: "/",
    component: Layout,
    name: "homePage",
    redirect: "/homePage",
  },
  // {
  //   path: "/",
  //   component: Layout,
  //   name: "homePage",
  //   redirect: "/homePage",
  //   children: [
  //     {
  //       path: "/homePage",
  //       name: "console",
  //       meta: {
  //         hidden: true,
  //         title: "登录",
  //       },
  //       component: () => import("@/views/homePage/console/index.vue"),
  //     },
  //   ],
  // },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes: constantRoutes,
});

export default router;
